package com.dhkj.web.idf.model;

import android.os.Parcel;
import android.os.Parcelable;

public class MatchLocation implements Parcelable{
    /**
     * "location": {
     * "height": 0.6358333333333334,
     * "left": 0.155,
     * "top": 0.058333333333333334,
     * "width": 0.47
     * }
     */

    private float height;
    private float width;
    private float left;
    private float top;

    public float getHeight() {
        return height;
    }

    public void setHeight(float height) {
        this.height = height;
    }

    public float getWidth() {
        return width;
    }

    public void setWidth(float width) {
        this.width = width;
    }

    public float getLeft() {
        return left;
    }

    public void setLeft(float left) {
        this.left = left;
    }

    public float getTop() {
        return top;
    }

    public void setTop(float top) {
        this.top = top;
    }

    public MatchLocation(Parcel in) {
        this.height = in.readFloat();
        this.width = in.readFloat();
        this.left = in.readFloat();
        this.top = in.readFloat();
    }

    public static final Parcelable.Creator<MatchLocation> CREATOR = new Parcelable.Creator<MatchLocation>() {
        @Override
        public MatchLocation createFromParcel(Parcel in) {
            return new MatchLocation(in);
        }

        @Override
        public MatchLocation[] newArray(int size) {
            return new MatchLocation[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeFloat(this.height);
        parcel.writeFloat(this.width);
        parcel.writeFloat(this.left);
        parcel.writeFloat(this.top);
    }

    @Override
    public String toString() {
        return "MatchLocation{" +
                "height=" + height +
                ", width=" + width +
                ", left=" + left +
                ", top=" + top +
                '}';
    }
}
